﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RequestIntroduction.aspx.cs" Inherits="FriendsNearby.Fbml.RequestIntroduction" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Request introduction</title>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/base.css?13:73113" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/apps_menu.css?13:69242" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/wallpro.css?13:70344" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/dialog.css?13:39930" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/attachments.css?13:59060" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/captcha/captcha.css?13:60350" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/dialogpro.css?13:67011" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/canvas.css?13:72811" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/pages.css?13:68178" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/api/confirmation.css?13:59219" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/typeaheadpro.css?13:63906" type="text/css"/>
    <link rel="stylesheet" href="http://static.ak.facebook.com/css/intl.css?13:70182" type="text/css"/><!--[if lte IE 6]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(http://static.ak.facebook.com/css/ie6.css?13:71775); /* ]]> */</style><![endif]-->
</head>
<body>
    <fb:FacebookApplication ID="fbApplication" runat="server" Mode="IFrame"
        EnableExternalBrowsing="true"
        ApplicationName="FriendsNearby" />
    
    <form id="form1" runat="server">
    <asp:Panel ID="RequestFormElements" runat="server">
    <div>
        This form will send a notification to both the person you request an introduction to and a mutual friend.
        The notification will be send by Instedd using Facebooks notification system.<br />
        <br />
        <b>Personal message:</b><br />
        <asp:TextBox ID="FriendRequestMessage" runat="server" Height="99px" Width="369px" Rows="10" 
            TextMode="MultiLine">Hi, I noticed you are in the neighborhood when using the Contacts Nearby application. I need a little help over at this end and wondered whether I could get in touch with you.
        </asp:TextBox>
        <br />
        <br />
        <asp:Panel ID="MutualFriendListContainer" runat="server">
        <asp:Label ID="MutualFriendListLabel" runat="server">I would like to get introduced through the following contact:</asp:Label><br />
        <asp:DropDownList ID="MutualFriendList" name="mutual_friend" runat="server">
        </asp:DropDownList>
        </asp:Panel><br/>
        <b>Who is this message going to?</b><br />
        We are sending this message to the person you'd like to contact and your mutual contact<%=GetMutualFriendNameIfOnlyOneExistsAndCanShow() %>. 
        <div id="AnonymousMutualText" runat="server">We can't show you the names, however, out of respect for the privacy settings of those involved. They can easily send you a reply message and disclose their identities. Thank you for understanding.</div>
        <br />
	<br/>
    </div>
    <asp:HiddenField ID="FriendOfFriend" runat="server" />
    <asp:HiddenField ID="MutualFriend" runat="server" />
    <asp:Button style="text-align:middle;vertical-align: middle" ID="Submit" runat="server" Text="Submit Request" onclick="Submit_Click" /> or <a target="_parent" href="http://apps.facebook.com<%=FriendsNearby.ConfigHelper.FacebookUrl%>Default.aspx"><b>Cancel</b></a>
    </asp:Panel>
    <asp:Panel runat="server" Visible="false" ID="RequestSucceded">
    Your request is processed,  <a target="_parent" href="http://apps.facebook.com<%=FriendsNearby.ConfigHelper.FacebookUrl%>Default.aspx">click here to close this dialog</a>.
    </asp:Panel>
    <asp:Panel runat="server" Visible="false" ID="RequestNoCommonFriends">
    Unfortunately the privacy settings of your mutual contact do not allow you to request an introduction.
    <a target="_parent" href="http://apps.facebook.com<%=FriendsNearby.ConfigHelper.FacebookUrl%>Default.aspx">click here to close this dialog</a>.
    </asp:Panel>
    </form>
    
</body>
</html>
